package shipping.api.vo;

import utils.Lang;

import javax.persistence.Column;
import java.io.Serializable;
import java.util.Date;

/**
 * 通用配送信息VO
 * Created by Liang Wenxu on 2017-03-09.
 */
public class ShippingInfoVo implements Serializable {
    /**
     *  配送订单ID
     */
    private String shippingBillId;
    /**
     * 商户订单号（非集采系统，或配送物非集采相关物件时为空）
     */
    private String orderNo;
    /**
     * 运单号(面单打印、填写后必传)
     */
    private String shippingNo;

    /**
     * 物流配送状态
     * 0-- 未处理
     * 1-- 已打印面单
     * 2-- 已打包
     * 3-- 已通知物流公司取件
     * 4-- 物流公司以及取件
     * 5-- 配送中
     * 6-- 已签收
     * 7-- 已取消
     */
    private String status;

    /**
     * 最后一次查询第三方物流跟踪状态代码
     */
    private String lastTrackStatus;

    /**
     * 最后一次查询第三方物跟踪信息
     */
    private String getLastTrackMessage;

    /**
     * 最后一次跟踪第三方物流时间
     */
    private Date lastTrackTime;

    /**
     * 品名
     */
    private String productName;
    /**
     * 数量
     */
    private Integer count;
    /**
     * 重量
     */
    private Double weight;
    /**
     * 备注
     */
    private String remark;
    /**
     * 分单数量，无特殊要求时为null
     */
    private Integer subBillCount;
    /**
     * 代收货款
     * 1-- 需代收货款
     * 0-- 不需代收货款
     */
    private String collectMoney;
    /**
     * 配送费用到付
     * 1-- 到付
     * 0-- 非到付
     */
    private String payOnDelivery;
    /**
     * 送货网点
     */
    private String sendPoint;
    /**
     * 收件人姓名
     */
    private String reciveName;
    /**
     * 收件省份代码
     */
    private String reciveProvince;
    /**
     * 收件人市代码
     */
    private String reciveCity;
    /**
     * 收件人区代码
     */
    private String reciveArea;
    /**
     * 收件人详细地址
     */
    private String reciveAddr;
    /**
     * 收件人公司
     */
    private String reciveCom;
    /**
     * 收件人电话
     */
    private String recivePhone;
    /**
     * 收件人邮编
     */
    private String recivePCode;
    /**
     * 发件人名字
     */
    private String senderName;
    /**
     * 发件人省代码
     */
    private String senderProvince;
    /**
     * 发件人市代码
     */
    private String senderCity;
    /**
     * 发件人区代码
     */
    private String senderArea;
    /**
     * 发件人机构
     */
    private String senderAddr;
    /**
     * 发件人公司
     */
    private String senderCom;
    /**
     * 发件人电话
     */
    private String senderPhone;
    /**
     * 发件人邮编
     */
    private String senderPCode;
    /**
     * 发件城市
     */
    private String sendCity;
    /**
     * 投递城市
     */
    private String targetCity;
    /**
     * 长度（可为空）
     */
    private Double length;
    /**
     * 宽度（可为空）
     */
    private Double width;
    /**
     * 高度（可为空）
     */
    private Double height;
    /**
     * 总货款（代收货款时非空）
     */
    private Double totalPrice;

    /**
     * 物流配置表ID
     */
    private String configId;

    public String getReciveAddrDetial() {
        StringBuilder sb = new StringBuilder();
        sb.append(Lang.isEmpty(reciveProvince) ? "" : reciveProvince)
                .append(Lang.isEmpty(reciveCity) ? "" : reciveCity)
                .append(Lang.isEmpty(reciveArea) ? "" : reciveArea)
                .append(Lang.isEmpty(reciveAddr) ? "" : reciveAddr);

        return sb.toString();
    }

    public String getShippingBillId() {
        return shippingBillId;
    }

    public void setShippingBillId(String shippingBillId) {
        this.shippingBillId = shippingBillId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Double getWeight() {
        return weight;
    }

    public void setWeight(Double weight) {
        this.weight = weight;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getSubBillCount() {
        return subBillCount;
    }

    public void setSubBillCount(Integer subBillCount) {
        this.subBillCount = subBillCount;
    }

    public String getCollectMoney() {
        return collectMoney;
    }

    public void setCollectMoney(String collectMoney) {
        this.collectMoney = collectMoney;
    }

    public String getPayOnDelivery() {
        return payOnDelivery;
    }

    public void setPayOnDelivery(String payOnDelivery) {
        this.payOnDelivery = payOnDelivery;
    }

    public String getSendPoint() {
        return sendPoint;
    }

    public void setSendPoint(String sendPoint) {
        this.sendPoint = sendPoint;
    }

    public String getReciveName() {
        return reciveName;
    }

    public void setReciveName(String reciveName) {
        this.reciveName = reciveName;
    }

    public String getReciveProvince() {
        return reciveProvince;
    }

    public void setReciveProvince(String reciveProvince) {
        this.reciveProvince = reciveProvince;
    }

    public String getReciveCity() {
        return reciveCity;
    }

    public void setReciveCity(String reciveCity) {
        this.reciveCity = reciveCity;
    }

    public String getReciveArea() {
        return reciveArea;
    }

    public void setReciveArea(String reciveArea) {
        this.reciveArea = reciveArea;
    }

    public String getReciveAddr() {
        return reciveAddr;
    }

    public void setReciveAddr(String reciveAddr) {
        this.reciveAddr = reciveAddr;
    }

    public String getReciveCom() {
        return reciveCom;
    }

    public void setReciveCom(String reciveCom) {
        this.reciveCom = reciveCom;
    }

    public String getRecivePhone() {
        return recivePhone;
    }

    public void setRecivePhone(String recivePhone) {
        this.recivePhone = recivePhone;
    }

    public String getRecivePCode() {
        return recivePCode;
    }

    public void setRecivePCode(String recivePCode) {
        this.recivePCode = recivePCode;
    }

    public String getSenderName() {
        return senderName;
    }

    public void setSenderName(String senderName) {
        this.senderName = senderName;
    }

    public String getSenderProvince() {
        return senderProvince;
    }

    public void setSenderProvince(String senderProvince) {
        this.senderProvince = senderProvince;
    }

    public String getSenderCity() {
        return senderCity;
    }

    public void setSenderCity(String senderCity) {
        this.senderCity = senderCity;
    }

    public String getSenderArea() {
        return senderArea;
    }

    public void setSenderArea(String senderArea) {
        this.senderArea = senderArea;
    }

    public String getSenderAddr() {
        return senderAddr;
    }

    public void setSenderAddr(String senderAddr) {
        this.senderAddr = senderAddr;
    }

    public String getSenderCom() {
        return senderCom;
    }

    public void setSenderCom(String senderCom) {
        this.senderCom = senderCom;
    }

    public String getSenderPhone() {
        return senderPhone;
    }

    public void setSenderPhone(String senderPhone) {
        this.senderPhone = senderPhone;
    }

    public String getSenderPCode() {
        return senderPCode;
    }

    public void setSenderPCode(String senderPCode) {
        this.senderPCode = senderPCode;
    }

    public String getSendCity() {
        return sendCity;
    }

    public void setSendCity(String sendCity) {
        this.sendCity = sendCity;
    }

    public String getTargetCity() {
        return targetCity;
    }

    public void setTargetCity(String targetCity) {
        this.targetCity = targetCity;
    }

    public Double getLength() {
        return length;
    }

    public void setLength(Double length) {
        this.length = length;
    }

    public Double getWidth() {
        return width;
    }

    public void setWidth(Double width) {
        this.width = width;
    }

    public Double getHeight() {
        return height;
    }

    public void setHeight(Double height) {
        this.height = height;
    }

    public Double getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(Double totalPrice) {
        this.totalPrice = totalPrice;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getShippingNo() {
        return shippingNo;
    }

    public void setShippingNo(String shippingNo) {
        this.shippingNo = shippingNo;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getLastTrackStatus() {
        return lastTrackStatus;
    }

    public void setLastTrackStatus(String lastTrackStatus) {
        this.lastTrackStatus = lastTrackStatus;
    }

    public String getGetLastTrackMessage() {
        return getLastTrackMessage;
    }

    public void setGetLastTrackMessage(String getLastTrackMessage) {
        this.getLastTrackMessage = getLastTrackMessage;
    }

    public Date getLastTrackTime() {
        return lastTrackTime;
    }

    public void setLastTrackTime(Date lastTrackTime) {
        this.lastTrackTime = lastTrackTime;
    }

    public String getConfigId() {
        return configId;
    }

    public void setConfigId(String configId) {
        this.configId = configId;
    }

    @Override
    public String toString() {
        return "ShippingInfoVo{" +
                "shippingBillId='" + shippingBillId + '\'' +
                ", orderNo='" + orderNo + '\'' +
                ", shippingNo='" + shippingNo + '\'' +
                ", status='" + status + '\'' +
                ", lastTrackStatus='" + lastTrackStatus + '\'' +
                ", getLastTrackMessage='" + getLastTrackMessage + '\'' +
                ", lastTrackTime=" + lastTrackTime +
                ", productName='" + productName + '\'' +
                ", count=" + count +
                ", weight=" + weight +
                ", remark='" + remark + '\'' +
                ", subBillCount=" + subBillCount +
                ", collectMoney='" + collectMoney + '\'' +
                ", payOnDelivery='" + payOnDelivery + '\'' +
                ", sendPoint='" + sendPoint + '\'' +
                ", reciveName='" + reciveName + '\'' +
                ", reciveProvince='" + reciveProvince + '\'' +
                ", reciveCity='" + reciveCity + '\'' +
                ", reciveArea='" + reciveArea + '\'' +
                ", reciveAddr='" + reciveAddr + '\'' +
                ", reciveCom='" + reciveCom + '\'' +
                ", recivePhone='" + recivePhone + '\'' +
                ", recivePCode='" + recivePCode + '\'' +
                ", senderName='" + senderName + '\'' +
                ", senderProvince='" + senderProvince + '\'' +
                ", senderCity='" + senderCity + '\'' +
                ", senderArea='" + senderArea + '\'' +
                ", senderAddr='" + senderAddr + '\'' +
                ", senderCom='" + senderCom + '\'' +
                ", senderPhone='" + senderPhone + '\'' +
                ", senderPCode='" + senderPCode + '\'' +
                ", sendCity='" + sendCity + '\'' +
                ", targetCity='" + targetCity + '\'' +
                ", length=" + length +
                ", width=" + width +
                ", height=" + height +
                ", totalPrice=" + totalPrice +
                '}';
    }
}
